
#ifndef __APPLOAD_H__
#define __APPLOAD_H__

#include <stdint.h>

typedef void (*app_entry_t)(void *argv);

typedef struct
{
	app_entry_t entry;
    void *argv;
	char *name;
	uint32_t stack_size;
    uint8_t task_prio;
	uint8_t startup_sequence;
} appRegItem_t;

#define __app __attribute__((unused, section(".appRegTable")))

#define app_export(entry, argv, name, stack_size, task_prio, startup_sequence) \
	appRegItem_t _regAppItem_##entry __app = {entry, argv, name, stack_size, task_prio, startup_sequence}

#endif
